package com.software.myopiaparents.ui;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;


import com.software.myopiaparents.R;
import com.software.myopiaparents.base.BaseActivity;
import com.software.myopiaparents.content.Constant;

import butterknife.BindView;
import butterknife.OnClick;


/**
 * 关于我们
 *
 * @author penglei
 * @date 2020/05/15
 */
public class AboutActivity extends BaseActivity {
    private static final String TAG = "AboutActivity";

    @BindView(R.id.iv_title_left)
    ImageView mIvTitleLeft;
    @BindView(R.id.tv_title_text)
    TextView mTvTitleText;
    @BindView(R.id.tv_title_right)
    TextView mTvTitleRight;
    @BindView(R.id.lay_title_home)
    LinearLayout mLayTitleHome;

    @BindView(R.id.rl_policy)
    RelativeLayout mRlPolicy;
    @BindView(R.id.rl_explain)
    RelativeLayout mRlExplain;

    @Override
    protected int getContentViewId() {
        return R.layout.activity_about;
    }

    @Override
    public void initView() {
        mTvTitleText.setText(getResources().getString(R.string.s_set_about_us));
        mTvTitleRight.setVisibility(View.GONE);
    }

    @Override
    public void initData() {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @OnClick({R.id.iv_title_left, R.id.rl_policy, R.id.rl_explain})
    public void onClick(final View view) {
        Intent intent;
        switch (view.getId()) {
            case R.id.iv_title_left:
                finish();
                break;

            case R.id.rl_policy:
                intent = new Intent(AboutActivity.this, WebViewActivity.class);
                intent.putExtra("url", Constant.URL + Constant.YHXY_VIEW);
                intent.putExtra("type", 1);
                startActivity(intent);
                break;

            case R.id.rl_explain:
                intent = new Intent(AboutActivity.this, WebViewActivity.class);
                intent.putExtra("url", Constant.URL + Constant.YSZC_VIEW);
                intent.putExtra("type", 2);
                startActivity(intent);
                break;
        }
    }

}
